         **************************************************************
         *  Lunar: The Silver Star (Sega CD) - Un-Worked Design Patch *
         *                 Version 1 (24 Feb. 2017)                   *
         *            by Supper (suppertails66@gmail.com)             *
         **************************************************************

This is a patch that fixes many issues introduced in the US version of the Sega 
CD game Lunar: The Silver Star by its publisher, Working Designs. The US release 
increases a number of enemies' stats and makes various other questionable 
changes, such as increasing the amount of money donated at shrines. Due to Sega 
of America's content policies, it also reduces nudity and removes several 
symbols that could be interpreted as having religious connotations. This patch 
restores this content to match the Japanese version, and tries to make the game 
generally more pleasant to read by putting the text in mixed case instead of all 
caps.

              ****************************************************
              *                     Changes                      *
              ****************************************************

* All enemies have their stats restored to their original, lower amounts from 
the Japanese version. Note that in a rarity for a Working Designs release, only 
six enemies were changed, mostly bosses.
* Shrine donations were raised to 100s each in the US version; they're now 10s, 
as in the JP version. It still takes ten donations to get the bonus song, 
regardless of version.
* In the US version, donations to the shrine near the Red Dragon Cave were 
mistakenly made to give the player money instead of taking it away. This has 
been fixed.
* The US version modified the very end of the game to make Alex take extremely 
high damage from Luna's lightning blasts unless the player uses the Alex's Harp 
item. This has been restored to the Japanese behavior, where he always takes the 
reduced amount of damage.
* All hexagrams and pentagrams, which were removed from the US version at Sega 
of America's behest, have been restored. This includes the icons for the Light 
Barrier and Power Barrier items, as well as the various teleportation circles 
throughout the game.
* Xenobia's nude battle graphics have been restored.
* The brief nude shot of Luna in the ending was given a washed-out palette in 
the US version; it's been reverted to the original one.
* Though not technically a "restoration", all text has been converted to proper 
mixed case instead of all caps, and has been proofread to remove the most 
egregious errors.
* Related to the above, the original English font had very poor proportioning 
that made upper case and lower case letters look very awkward together. This 
patch tweaks the font to hopefully make it easier on the eyes.

Other changes in the US version (e.g. the removed English intro screen, the 
interchanged intro cutscene and title screen, the horrible horrible made-up 
script) have been kept.

For further details on the alterations in the US version, see this page (though 
I may not have written the Regional Differences section yet, depending on when 
you read this): https://tcrf.net/Lunar:_The_Silver_Star

              ****************************************************
              *               Patching Instructions              *
              ****************************************************

--- WHAT YOU'LL NEED ---
* A BIN/CUE or ISO/WAV format disc image of the US version of Lunar: The Silver 
Star (Sega CD).
* If you're on Windows, the xdelta patching utility (http://xdelta.org/) is 
provided in this distribution. On other platforms, you'll need to acquire 
version 3.0.8 or later on your own.

--- AUTOMATIC PATCHING METHOD (WINDOWS) ---

If you're using Windows, move your disc image files into the same directory as 
the program and do one of these as appropriate:
  * If you have a BIN/CUE disc image, drag and drop the BIN file (or IMG file) 
onto binpatch.bat.
  * If you have an ISO/WAV disc image, drag and drop the ISO file onto 
isopatch.bat. Note that your ISO/WAV files **must** use the standard numbering 
format "File 01.iso", "File 02.wav", etc. If the files are named something else, 
like "File (Track 01 of 52).iso", you'll need to rename them.

If everything works, this should produce the patched game under the name 
"LunarTheSilverStarUnWorked_##". To play it, make sure the file 
"LunarTheSilverStarUnWorked.cue" (included with the patch) is in the same 
directory as everything else and then load it in an emulator, or burn it to a CD 
for use on real hardware.

If this doesn't work, try using the manual patching method below to diagnose the 
problem.

--- MANUAL PATCHING METHOD ---

--- CONVERTING FROM BIN/CUE TO ISO ---
If you have a BIN/CUE image (or the equivalent format IMG/CUE), you'll need to 
convert it to ISO/WAV before you can patch it. I'd recommend using BinChunker 
(a.k.a. bchunk -- homepage http://he.fi/bchunk/) to do this.

* On Windows, you can use the included bchunk.exe (courtesy of elmer). If you 
don't want to use bchunk, there are also many "shareware"/commercial utilities 
that can do this task, though they may or may not output the same ISO as bchunk.
* On Linux, it should be available from your distro's repos, or of course you 
can build from source.
* On Mac, you can build from source, or perhaps get binaries wherever Mac people 
get their binaries from.

To convert, open a command prompt and navigate to the folder containing the 
BIN/CUE, then run the following command:

bchunk -w LunarTheSilverStarUS.bin LunarTheSilverStarUS.cue 
LunarTheSilverStarUS_

(substituting the names of your BIN/CUE files, obviously -- remember to put 
quotes around them if they have spaces in them. **Don't rename them** -- this 
will cause the conversion to fail unless you also modify the CUE file itself.) 
This should generate 52 files: LunarTheSilverStarUS_01.iso, 
LunarTheSilverStarUS_02.wav, and LunarTheSilverStarUS_03.wav, and so on up to 
LunarTheSilverStarUS_52.wav.

--- PATCHING STEPS---
1. First, !!!***verify that your ISO has the correct MD5 hash***!!! It should be 
e770f927cb95fbafd4cf1cde57143912. If it isn't, the patch almost certainly won't 
work. You can obtain this by using the md5sum utility on *nix, or the FCIV 
utility (https://support.microsoft.com/en-us/kb/889768) on Windows.

2. Use xdelta to apply LunarTheSilverStarUnWorked.xdelta to your ISO. If you're 
using the command line, this would look something like:

xdelta3 -d -s LunarTheSilverStarUnWorked.xdelta LunarTheSilverStarUS_01.iso 
LunarTheSilverStarUnWorked_01.iso

If you use a GUI wrapper, it should be self-explanatory, but make sure the 
output file is named LunarTheSilverStarUnWorked_01.iso.

3. That's technically all the patching required, but assuming you want to play 
on an emulator, we now need to make sure the CD audio files are properly 
associated with the ISO or it will likely hang when it needs to play them. 
First, make sure your patched ISO is named LunarTheSilverStarUnWorked_01.iso, 
then rename the audio files produced from the BIN/CUE conversion process to 
LunarTheSilverStarUnWorked_02.wav, LunarTheSilverStarUnWorked_03.wav, and so on 
up to LunarTheSilverStarUnWorked_52.wav.

4. A CUE file named LunarTheSilverStarUnWorked.cue is included with this patch. 
Move it to the same directory as your ISO and WAV files.

5. Test that the game works by loading LunarTheSilverStarUnWorked.cue in your 
emulator. Press A, B, or C at the BIOS startup screen to start the CD player, 
and make sure the number of tracks listed is 52.

--- TROUBLESHOOTING ---
* If the CD audio tracks go out of sync, and you patched an ISO/WAV rip, check 
your audio tracks. If they start with a couple of seconds of silence each, the 
software used to rip the disc chose to bake the pregaps into the audio files, 
which is not the standard format the included CUE file expects. You can rectify 
this by chopping the first couple of seconds of each audio file off in an editor 
such as Audacity.
* If the automatic patching method fails to produce any audio files, make sure 
all your files are named in the format "Filename ##.wav". The patcher expects to 
see a two-digit number directly before the file extension; without that, it 
can't find the tracks.
* If the patched ISO won't run, check the MD5 hashes of your original ISO and 
the patched ISO. The correct hashes are given in the steps above. If either of 
them doesn't match, try a different method for converting the BIN/CUE to ISO, or 
using a BIN/CUE generated by a different program.
* If loading LunarTheSilverStarUnWorked.cue doesn't work, try loading 
LunarTheSilverStarUnWorked_01.iso by itself. If that works, make sure all your 
files are named exactly as described above, and that the names in the CUE file 
match your audio files. CUE files are plaintext; just open it in Notepad or 
whatever.
* If your ISO has associated sound files in some format other than WAV (or your 
emulator doesn't support WAV files), you'll need to either convert them to WAV 
or modify the CUE file to use a different format. In the latter case, change 
(for example) all occurences of WAVE to MP3, and make sure the filenames are 
correct.
* If the game works fine but crashes when CD audio should play, your audio files 
aren't properly associated with the ISO. Check that your filenames match what's 
described in LunarTheSilverStarUnWorked.cue.

              ****************************************************
              *                  Known Issues                    *
              ****************************************************

* Subtitles are still in all-caps. This is because instead of using any kind of 
text-based format, they're basically hardcoded into the game exactly as they 
appear, and editing them will require more time and effort than I'm willing to 
put into this version of the patch.
* Voiced cutscenes that had their subtitles removed in the US version have not 
been restored, for the same reason as the above.
* The "Save" and "Load" options are in all-caps on the relevant menus because of 
a quirk in how they're implemented (the same "SAVE" and "LOAD" strings are 
recycled for multiple purposes).
* When Nash rejoins the party in Ruid, an earlier part of his conversation 
repeats at the end. This is a bug in the original US version that hasn't been 
fixed.
* In the Japanese version, characters will only level up once at the end of a 
battle, even if they gained enough EXP to level up multiple times. In the US 
version, they'll gain as many levels as they logically "should". I've left this 
alone because (a) it seems more like an oversight that was fixed for the US 
release than a purposeful modification to the difficulty, and (b) there are 
really only a couple of places where this is ever likely to occur, and the 
effect on gameplay is negligible.

              ****************************************************
              *                 Version History                  *
              ****************************************************

Version 1 (2/24/17)
  * Updated the included CUE file to fix issues with out-of-sync CD audio tracks 
on real hardware and accurate emulators. Patch content is unchanged.

Version 0 (2/18/17)
  * Initial release.

              ****************************************************
              *                  Special Thanks                  *
              ****************************************************

* vivify93, for help with the tweaked font and general support
* Spooniest, for finding the CD audio syncing issues
* chrisw80, for testing on real hardware and finding the CD audio syncing issues
* Swashbuckler on GameFAQs, for documenting the bugged shrine near the Red 
Dragon Cave
* LunarNET, for documenting several changes I didn't know about
* elmer
* Everyone on ROMhacking.net who provided feedback and support
